#include "EPSGLua/Console.h"

#include "EPSGLua/Global.h"
#include "EPSGLua/Exporter.h"

EPSGLua::Console::Console()
{
	if( !EPSGLua::Exporter::isPrepared() )
		EPSGLua::Exporter::prepareLua();
}

void EPSGLua::Console::operator<<( const std::string& command )
{
	luaL_dostring( Global::instance()->getLuaState(), command.data() );
}

void EPSGLua::Console::operator+=( const std::string& filePath )
{
	luaL_dofile( Global::instance()->getLuaState(), filePath.data() );
}